package edu.sctu.practice.class02.mengyao.text10;

/**
 * Created by Administrator on 2015/10/14.
 */
public class Addition {
    int number1, number2;
    Long number4, number3;
    Float number5, number6;
    Double number7, number8;
    String number9, number0;

    public int add(int number1, int number2) {
        this.number1 = number1;
        this.number2 = number2;
        int resultOfAdd = number1 + number2;
        return resultOfAdd;

    }

    private long add(Long number4, long number3) {
        this.number4 = number4;
        this.number3 = number3;
        long resultOfAdd = number3 + number4;
        return resultOfAdd;

    }

    public float add(Float number5, float number6) {
        this.number5 = number5;
        this.number6 = number6;
        float resultOfAdd = number6 + number5;
        return resultOfAdd;

    }

    public double add(Double number7, double number8) {
        this.number7 = number7;
        this.number8 = number8;
        double resultOfAdd = number8 + number7;
        return resultOfAdd;

    }

    public String add(String number9, String number0) {
        this.number9 = number9;
        this.number0 = number0;
        String resultOfAdd = number0 + number9;
        return resultOfAdd;

    }

    public static void main(String[] args) {
        Addition addition = new Addition();
        addition.add(2.5, 5.6);
        addition.add(1.2, 1.0);
        addition.add(4, 5);
        addition.add(6, 7);
        addition.add("2", "8");
    }

}
